import {
  Controller,
  Get,
  UseGuards,
  Post,
  SetMetadata,
  Body,
} from '@nestjs/common';
import { AppService } from './app.service';
import { YuiService } from './yui/yui.service';
import { YuicService } from './yuic/yuic.service';
// import { RolesGuard } from './guard/roles.guard';
export const Roles = (...roles: string[]) => {
  return SetMetadata('roles', roles);
};
@Controller()
export class AppController {
  constructor(
    private readonly appService: AppService,
    private readonly yuiService: YuiService,
    private readonly yuicService: YuicService,
  ) {}

  @Get()
  // @UseGuards(RolesGuard)
  getHello(): any {
    return 'get';
  }

  // @Post()
  // @SetMetadata('roles', ['admin'])
  // async create(@Body() createCatDto: CreateCatDto) {
  //   this.catsService.create(createCatDto);
  // }
}
